<!--
 * @Author: your name
 * @Date: 2022-03-30 22:53:20
 * @LastEditTime: 2022-03-31 19:21:19
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \算法测试\day0906\3.30.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /**
 * @param {number} left
 * @param {number} right
 * @return {number[]}
 */
        var selfDividingNumbers = function (left, right) {
            let result = [];
            for (let i = left; i <= right; i++) {
                let num = i, flag = true;
                while (num > 0) {
                    let sum = num % 10;
                    if (sum === 0 || i % sum !== 0) {
                        flag = false;
                        break;
                    }
                    num = Math.floor(num / 10);
                }
                if (flag) result.push(i);
            }
            return result;
        };
        console.log(selfDividingNumbers(1, 22));
        let a = 11;
        console.log(a /= 10);
    </script>
</body>

</html>